<%@page import="models.SolutionAdoption"%>
<%@ page import="com.googlecode.objectify.Objectify, com.googlecode.objectify.ObjectifyService, com.googlecode.objectify.Query" %>
<%@ page import = "controllers.SolutionConnect, controllers.AdoptionConnect" %>
<%@ page import = "models.SolutionSubmission, models.Location" %>
<%@ page import="java.util.*" %>

<%
Objectify ofy = ObjectifyService.begin();
Query<SolutionSubmission> q = ofy.query(SolutionSubmission.class).filter("achievedTypeDesc","Employee engagement");
int ee = q.countAll();

q = ofy.query(SolutionSubmission.class).filter("achievedTypeDesc","Customer satisfaction");
int cs = q.countAll();

q = ofy.query(SolutionSubmission.class).filter("achievedTypeDesc","Order Lead Time");
int olt = q.countAll();

q = ofy.query(SolutionSubmission.class).filter("achievedTypeDesc","Quality");
int quality = q.countAll();

q = ofy.query(SolutionSubmission.class).filter("achievedTypeDesc","Safety");
int safety = q.countAll();

%>


<chart palette='4' caption='Solution distribution by Primary Benefit' decimals='0' enableSmartLabels='1' enableRotation='0' bgColor='B6E68E,FFFFFF' bgAlpha='40,100' bgRatio='0,100' bgAngle='360' showBorder='1' startingAngle='70' showLabels='1'  >
<set label='Employee engagement' value='<%=ee%>' link='/modules/reports/benefit-search-solution.jsp?benefit=Employee engagement' />
<set label='Customer satisfaction' value='<%=cs%>' link='/modules/reports/benefit-search-solution.jsp?benefit=Customer satisfaction'/>
<set label='Order Lead Time' value='<%=olt%>' link='/modules/reports/benefit-search-solution.jsp?benefit=Order Lead Time'/>
<set label='Quality' value='<%=quality%>' link='/modules/reports/benefit-search-solution.jsp?benefit=Quality'/>
<set label='Safety' value='<%=safety%>' link='/modules/reports/benefit-search-solution.jsp?benefit=Safety'/>
</chart>


